package innerclass.anonymous;

public class Outer {
    public void test(Inner inner) {
        System.out.println("Hello world");
    }

    public static void main(String[] args) {
        Outer outer = new Outer();
        outer.test(new Inner() {
            @Override
            public void test() {
                System.out.println("Hello world2");
            }
        });
    }
}

interface Inner {
    void test();
}